home *** CD-ROM | disk | FTP | other *** search
/ Graphics Plus / Graphics Plus.iso / libs / phigs / ptk.lha / ptk / source / library / psetfns.c < prev    next >
Encoding:
C/C++ Source or Header  |  1992-10-01  |  22.6 KB  |  827 lines

  1. /*--------------------------------------------------------------------------*/
  2. /*---------------------- phinter set functions -----------------------------*/
  3. /*--------------------------------------------------------------------------*/
  4.  
  5. static void do_psetannotationalign()
  6. {
  7.   Ptext_align a;
  8.  
  9.   a.hor = readphigsenum(PTKETXHOR, "horizontal alignment ? ");
  10.   a.vert = readphigsenum(PTKETXVER, "vertical alignment ? ");
  11.   pset_anno_align(&a);
  12. }  /* do_psetannotationalign */
  13.  
  14. /*--------------------------------------------------------------------------*/
  15.  
  16. static void do_psetannotationcharheight()
  17. {
  18.   pset_anno_char_ht(readreal("annotation character height  ? "));
  19. }  /* do_psetannotationcharheight */
  20.  
  21. /*--------------------------------------------------------------------------*/
  22.  
  23. static void do_psetannotationcharup()
  24. {
  25.   Pvec v;
  26.  
  27.   v = readvector("annotation character up vector");
  28.   pset_anno_char_up_vec(&v);
  29. }  /* do_psetannotationcharup */
  30.  
  31. /*--------------------------------------------------------------------------*/
  32.  
  33. static void do_psetannotationpath()
  34. {
  35.   Ptext_path p;
  36.  
  37.   p = readphigsenum(PTKETXPATH, "annotation text path ? ");
  38.   pset_anno_path(p);
  39. }  /* do_psetannotationpath */
  40.  
  41. /*--------------------------------------------------------------------------*/
  42.  
  43. static void do_psetannotationstyle()
  44. {
  45.   pset_anno_style(readinteger("annotation style ? "));
  46. }  /* do_psetannotationstyle */
  47.  
  48. /*--------------------------------------------------------------------------*/
  49.  
  50. static void do_psetcharexpan()
  51. {
  52.   pset_char_expan(readreal("character expansion ? "));
  53. }  /* do_psetcharexpan */
  54.  
  55. /*--------------------------------------------------------------------------*/
  56.  
  57. static void do_psetcharheight()
  58. {
  59.   pset_char_ht(readreal("character height ? "));
  60. }  /* do_psetcharheight */
  61.  
  62. /*--------------------------------------------------------------------------*/
  63.  
  64. static void do_psetcharspace()
  65. {
  66.   pset_char_space(readreal("character spacing ? "));
  67. }  /* do_psetcharspace */
  68.  
  69. /*--------------------------------------------------------------------------*/
  70.  
  71. static void do_psetcharup()
  72. {
  73.   Pvec v;
  74.  
  75.   v = readvector("character up vector");
  76.   pset_char_up_vec(&v);
  77. }  /* do_psetcharup */
  78.  
  79. /*--------------------------------------------------------------------------*/
  80.  
  81. static void do_psetchoicemode()
  82. {
  83.   Pint wsid, dev;
  84.   Pop_mode mode;
  85.   Pecho_switch echo;
  86.  
  87.   wsid = readinteger("workstation identifier ? ");
  88.   dev = readinteger("choice device number ? ");
  89.   mode = readphigsenum(PTKEIMODE, "operating mode ? ");
  90.   echo = readphigsenum(PTKEESW, "echo switch ? ");
  91.   pset_choice_mode(wsid, dev, mode, echo);
  92. }  /* do_psetchoicemode */
  93.  
  94. /*--------------------------------------------------------------------------*/
  95.  
  96. static void do_psetcolourmodel()
  97. {
  98.   Pint wsid, model;
  99.  
  100.   wsid = readinteger("workstation identifier ? ");
  101.   model = readinteger("colour model ? ");
  102.   pset_colr_model(wsid, model);
  103. }  /* do_psetcolourmodel */
  104.  
  105. /*--------------------------------------------------------------------------*/
  106.  
  107. static void do_psetcolourrep()
  108. {
  109.   Pint w, i;
  110.   Pcolr_rep c;
  111.  
  112.   w = readinteger("workstation identifier ? ");
  113.   i = readposintvalue("colour table index ? ", PTKECOLOURIND);
  114.   getcolourmodel(w);
  115.   c = readcolour();
  116.   pset_colr_rep(w, i, c);
  117. }  /* do_psetcolourrep */
  118.  
  119. /*--------------------------------------------------------------------------*/
  120.  
  121. static void do_psetconfres()
  122. {
  123.   pset_conf_res(readphigsenum(PTKECONFRES, "archive conflict ? "), readphigsenum(PTKECONFRES, "retrieve conflict ? "));
  124. }  /* do_psetconfres */
  125.  
  126. /*--------------------------------------------------------------------------*/
  127.  
  128. static void do_psetdisplayupdatest()
  129. {
  130.   Pint wsid;
  131.   Pdefer_mode defer;
  132.   Pmod_mode modmode;
  133.  
  134.   wsid = readinteger("workstation identifier ? ");
  135.   defer = readphigsenum(PTKEDEFMODE, "deferral mode ? ");
  136.   modmode = readphigsenum(PTKEMOD, "modification mode ? ");
  137.   pset_disp_upd_st(wsid, defer, modmode);
  138. }  /* do_psetdisplayupdatest */
  139.  
  140. /*--------------------------------------------------------------------------*/
  141.  
  142. static void do_psetedgecolourind()
  143. {
  144.   pset_edge_colr_ind(readposintvalue("edge colour index ? ", PTKECOLOURIND));
  145. }  /* do_psetedgecolourind */
  146.  
  147. /*--------------------------------------------------------------------------*/
  148.  
  149. static void do_psetedgeflag()
  150. {
  151.   Pedge_flag edgeflag;
  152.  
  153.   edgeflag = readphigsenum(PTKEEDGEF, "edge flag ? ");
  154.   pset_edge_flag(edgeflag);
  155. }  /* do_psetedgeflag */
  156.  
  157. /*--------------------------------------------------------------------------*/
  158.  
  159. static void do_psetedgeind()
  160. {
  161.   pset_edge_ind(readposinteger("edge index ? "));
  162. }  /* do_psetedgeind */
  163.  
  164. /*--------------------------------------------------------------------------*/
  165.  
  166. static void do_psetedgerep()
  167. {
  168.   Pint wsid, index;
  169.   Pedge_bundle rep;
  170.  
  171.   wsid = readinteger("workstation identifier ? ");
  172.   index = readposinteger("edge bundle index ? ");
  173.   readedgebundl(&rep);
  174.   pset_edge_rep(wsid, index, &rep);
  175. }  /* do_psetedgerep */
  176.  
  177. /*--------------------------------------------------------------------------*/
  178.  
  179. static void do_psetedgewidth()
  180. {
  181.   pset_edgewidth(readreal("edge width ? "));
  182. }  /* do_psetedgewidth */
  183.  
  184. /*--------------------------------------------------------------------------*/
  185.  
  186. static void do_psetedgetype()
  187. {
  188.   pset_edgetype(readinteger("edge type ? "));
  189. }  /* do_psetedgetype */
  190.  
  191. /*--------------------------------------------------------------------------*/
  192.  
  193. static void do_pseteditmode()
  194. {
  195.   Pedit_mode mode;
  196.  
  197.   mode = readphigsenum(PTKEEDITMODE, "edit mode ? ");
  198.   pset_edit_mode(mode);
  199. }  /* do_pseteditmode */
  200.  
  201. /*--------------------------------------------------------------------------*/
  202.  
  203. static void do_psetelemptr()
  204. {
  205.   pset_elem_ptr(readinteger("element pointer ? "));
  206. }  /* do_psetelemptr */
  207.  
  208. /*--------------------------------------------------------------------------*/
  209.  
  210. static void do_psetelemptrlabel()
  211. {
  212.   pset_elem_ptr_label(readintvalue("label ? ", PTKELABELVAL));
  213. }  /* do_psetelemptrlabel */
  214.  
  215. /*--------------------------------------------------------------------------*/
  216.  
  217. static void do_pseterrorhandmode()
  218. {
  219.   Perr_mode mode;
  220.  
  221.   mode = readphigsenum(PTKEERRORMODE, "error handling mode ? ");
  222.   pset_err_hand_mode(mode);
  223. }  /* do_pseterrorhandmode */
  224.  
  225. /*--------------------------------------------------------------------------*/
  226.  
  227. static void do_psetglobaltran()
  228. {
  229.   Pmatrix xform;
  230.  
  231.   readmatrix(xform, "global transformation matrix");
  232.   pset_global_tran(xform);
  233. }  /* do_psetglobaltran */
  234.  
  235. /*--------------------------------------------------------------------------*/
  236.  
  237. static void do_psetglobaltran3()
  238. {
  239.   Pmatrix3 m;
  240.  
  241.   readmatrix3(m, "global transformation matrix");
  242.   pset_global_tran3(m);
  243. }  /* do_psetglobaltran3 */
  244.  
  245. /*--------------------------------------------------------------------------*/
  246.  
  247. static void do_psethlhsrid()
  248. {
  249.   pset_hlhsr_id(readinteger("HLHSR identifier ? "));
  250. }  /* do_psethlhsrid */
  251.  
  252. /*--------------------------------------------------------------------------*/
  253.  
  254. static void do_psethlhsrmode()
  255. {
  256.   Pint wsid, mode;
  257.  
  258.   wsid = readinteger("workstation identifier ? ");
  259.   mode = readinteger("HLHSR mode ? ");
  260.   pset_hlhsr_mode(wsid, mode);
  261. }  /* do_psethlhsrmode */
  262.  
  263. /*--------------------------------------------------------------------------*/
  264.  
  265. static void do_psethilightfilter()
  266. {
  267.   Pint wsid;
  268.   Pfilter highfilt;
  269.  
  270.   wsid = readinteger("workstation identifier ? ");
  271.   readintlst(&highfilt.incl_set, "inclusion set", PTKENAME);
  272.   readintlst(&highfilt.excl_set, "exclusion set", PTKENAME);
  273.   pset_highl_filter(wsid, &highfilt);
  274.   free(highfilt.incl_set.ints);
  275.   free(highfilt.excl_set.ints);
  276. }  /* do_psethilightfilter */
  277.  
  278. /*--------------------------------------------------------------------------*/
  279.  
  280. static void do_psetindivasf()
  281. {
  282.   Paspect attid;
  283.   Pasf attsource;
  284.  
  285.   attid = readphigsenum(PTKEATTRID, "attribute identifier ? ");
  286.   attsource = readphigsenum(PTKEASF, "attribute source ? ");
  287.   pset_indiv_asf(attid, attsource);
  288. }  /* do_psetindivasf */
  289.  
  290. /*--------------------------------------------------------------------------*/
  291.  
  292. static void do_psetintcolourind()
  293. {
  294.   pset_int_colr_ind(readposintvalue("interior colour index ? ", PTKECOLOURIND));
  295. }  /* do_psetintcolourind */
  296.  
  297. /*--------------------------------------------------------------------------*/
  298.  
  299. static void do_psetintind()
  300. {
  301.   pset_int_ind(readposinteger("interior index ? "));
  302. }  /* do_psetintind */
  303.  
  304. /*---------------------------------------------------------------------------*/
  305.  
  306. static void do_psetintrep()
  307. {
  308.   Pint wsid, index;
  309.   Pint_bundle rep;
  310.  
  311.   wsid = readinteger("workstation identifier ? ");
  312.   index = readposinteger("interior bundle index ? ");
  313.   readinterbundl(&rep);
  314.   pset_int_rep(wsid, index, &rep);
  315. }  /* do_psetintrep */
  316.  
  317. /*--------------------------------------------------------------------------*/
  318.  
  319. static void do_psetintstyle()
  320. {
  321.   Pint_style style;
  322.  
  323.   style = readphigsenum(PTKEINTERSTYLE, "interior style ? ");
  324.   pset_int_style(style);
  325. }  /* do_psetintstyle */
  326.  
  327. /*--------------------------------------------------------------------------*/
  328.  
  329. static void do_psetintstyleind()
  330. {
  331.   pset_int_style_ind(readinteger("interior style index ? "));
  332. }  /* do_psetintstyleind */
  333.  
  334. /*--------------------------------------------------------------------------*/
  335.  
  336. static void do_psetinvisfilter()
  337. {
  338.   Pint wsid;
  339.   Pfilter invisfilt;
  340.  
  341.   wsid = readinteger("workstation identifier ? ");
  342.   readintlst(&invisfilt.incl_set, "inclusion set", PTKENAME);
  343.   readintlst(&invisfilt.excl_set, "exclusion set", PTKENAME);
  344.   pset_invis_filter(wsid, &invisfilt);
  345.   free(invisfilt.incl_set.ints);
  346.   free(invisfilt.excl_set.ints);
  347. }  /* do_psetinvisfilter */
  348.  
  349. /*--------------------------------------------------------------------------*/
  350.  
  351. static void do_psetlinecolourind()
  352. {
  353.   pset_line_colr_ind(readposintvalue("line colour index ? ", PTKECOLOURIND));
  354. }  /* do_psetlinecolourind */
  355.  
  356. /*--------------------------------------------------------------------------*/
  357.  
  358. static void do_psetlinewidth()
  359. {
  360.   pset_linewidth(readreal("line width ? "));
  361. }  /* do_psetlinewidth */
  362.  
  363. /*--------------------------------------------------------------------------*/
  364.  
  365. static void do_psetlinetype()
  366. {
  367.   pset_linetype(readinteger("line type ? "));
  368. }  /* do_psetlinetype */
  369.  
  370. /*--------------------------------------------------------------------------*/
  371.  
  372. static void do_psetlocaltran()
  373. {
  374.   Pmatrix m;
  375.   Pcompose_type c;
  376.  
  377.   readmatrix(m, "matrix elements");
  378.   c = readphigsenum(PTKECOMPTYPE, "composition type ? ");
  379.   pset_local_tran(m, c);
  380. }  /* do_psetlocaltran */
  381.  
  382. /*--------------------------------------------------------------------------*/
  383.  
  384. static void do_psetlocaltran3()
  385. {
  386.   Pmatrix3 m;
  387.   Pcompose_type c;
  388.  
  389.   readmatrix3(m, "matrix elements");
  390.   c = readphigsenum(PTKECOMPTYPE, "composition type ? ");
  391.   pset_local_tran3(m, c);
  392. }  /* do_psetlocaltran3 */
  393.  
  394. /*--------------------------------------------------------------------------*/
  395.  
  396. static void do_psetlocmode()
  397. {
  398.   Pint wsid, dev;
  399.   Pop_mode mode;
  400.   Pecho_switch echo;
  401.  
  402.   wsid = readinteger("workstation identifier ? ");
  403.   dev = readinteger("locator device number ? ");
  404.   mode = readphigsenum(PTKEIMODE, "operating mode ? ");
  405.   echo = readphigsenum(PTKEESW, "echo switch ? ");
  406.   pset_loc_mode(wsid, dev, mode, echo);
  407. }  /* do_psetlocmode */
  408.  
  409. /*--------------------------------------------------------------------------*/
  410.  
  411. static void do_psetmarkercolourind()
  412. {
  413.   pset_marker_colr_ind(readposintvalue("marker colour index ? ", PTKECOLOURIND));
  414. }  /* do_psetmarkercolourind */
  415.  
  416. /*--------------------------------------------------------------------------*/
  417.  
  418. static void do_psetmarkersize()
  419. {
  420.   pset_marker_size(readreal("marker size ? "));
  421. }  /* do_psetmarkersize */
  422.  
  423. /*--------------------------------------------------------------------------*/
  424.  
  425. static void do_psetmarkertype()
  426. {
  427.   pset_marker_type(readinteger("marker type ? "));
  428. }  /* do_psetmarkertype */
  429.  
  430. /*--------------------------------------------------------------------------*/
  431.  
  432. static void do_psetmodelclipindicator()
  433. {
  434.   Pclip_ind ind;
  435.  
  436.   ind = readphigsenum(PTKECLIP, "clipping indicator ? ");
  437.   pset_model_clip_ind(ind);
  438. }  /* do_psetmodelclipindicator */
  439.  
  440. /*--------------------------------------------------------------------------*/
  441.  
  442. static void do_psetmodelclipvolume()
  443. {
  444.   Pint op, i;
  445.   Phalf_space_list halfspaces;
  446.  
  447.   op = readinteger("operator ? ");
  448.   halfspaces.num_half_spaces = readinteger("number of half spaces ? ");
  449.   halfspaces.half_spaces = (Phalf_space *)calloc(halfspaces.num_half_spaces, 
  450.                            sizeof(Phalf_space));
  451.   for (i = 0; i < halfspaces.num_half_spaces; i++)
  452.   {
  453.     halfspaces.half_spaces[i].point = readpoint("half space point");
  454.     halfspaces.half_spaces[i].norm = readvector("half space normal");
  455.   }
  456.   pset_model_clip_vol(op, &halfspaces);
  457. }  /* do_psetmodelclipvolume */
  458.  
  459. /*--------------------------------------------------------------------------*/
  460.  
  461. static void do_psetmodelclipvolume3()
  462. {
  463.   Pint op, i;
  464.   Phalf_space_list3 halfspaces;
  465.  
  466.   op = readinteger("operator ? ");
  467.   halfspaces.num_half_spaces = readinteger("number of half spaces ? ");
  468.   halfspaces.half_spaces = (Phalf_space3 *)calloc(halfspaces.num_half_spaces, 
  469.                            sizeof(Phalf_space3));
  470.   for (i = 0; i < halfspaces.num_half_spaces; i++)
  471.   {
  472.     halfspaces.half_spaces[i].point = readpoint3("half space point");
  473.     halfspaces.half_spaces[i].norm = readvector3("half space normal");
  474.   }
  475.   pset_model_clip_vol3(op, &halfspaces);
  476. }  /* do_psetmodelclipvolume3 */
  477.  
  478. /*--------------------------------------------------------------------------*/
  479.  
  480. static void do_psetpatrefpt()
  481. {
  482.   Ppoint refpt;
  483.  
  484. #ifdef HP
  485.   phintererror(1, (char *)NULL, INFORM);
  486. #else
  487.   refpt = readpoint("pattern reference point");
  488.   pset_pat_ref_point(&refpt);
  489. #endif
  490. }  /* do_psetpatrefpt */
  491.  
  492. /*--------------------------------------------------------------------------*/
  493.  
  494. static void do_psetpatrefptvectors()
  495. {
  496.   Ppoint3 refpt;
  497.   Pvec3 dx, dy;
  498.  
  499. #ifdef HP
  500.   phintererror(1, (char *)NULL, INFORM);
  501. #else
  502.   refpt = readpoint3("pattern reference point");
  503.   dx = readvector3("pattern x axis");
  504.   dy = readvector3("pattern y axis");
  505. #endif
  506. }  /* do_psetpatrefptvectors */
  507.  
  508. /*--------------------------------------------------------------------------*/
  509.  
  510. static void do_psetpatrep()
  511. {
  512.   phintererror(1, (char *)NULL, INFORM);
  513. }  /* do_psetpatrep */
  514.  
  515. /*--------------------------------------------------------------------------*/
  516.  
  517. static void do_psetpatsize()
  518. {
  519.   Pfloat patsizex, patsizey;
  520.  
  521. #ifdef HP
  522.   phintererror(1, (char *)NULL, INFORM);
  523. #else
  524.   patsizex = readreal("pattern size x");
  525.   patsizey = readreal("pattern size y");
  526.   pset_pat_size(patsizex, patsizey);
  527. #endif
  528. }  /* do_psetpatsize */
  529.  
  530. /*--------------------------------------------------------------------------*/
  531.  
  532. static void do_psetpickfilter()
  533. {
  534.   Pint wsid, dev;
  535.   Pfilter pickfilt;
  536.  
  537.   wsid = readinteger("workstation identifier ? ");
  538.   dev = readinteger("pick device number ? ");
  539.   readintlst(&pickfilt.incl_set, "inclusion set", PTKENAME);
  540.   readintlst(&pickfilt.excl_set, "exclusion set", PTKENAME);
  541.   pset_pick_filter(wsid, dev, &pickfilt);
  542.   free(pickfilt.incl_set.ints);
  543.   free(pickfilt.excl_set.ints);
  544. }  /* do_psetpickfilter */
  545.  
  546. /*--------------------------------------------------------------------------*/
  547.  
  548. static void do_psetpickid()
  549. {
  550.   pset_pick_id(readinteger("pick identifier ? "));
  551. }  /* do_psetpickid */
  552.  
  553. /*--------------------------------------------------------------------------*/
  554.  
  555. static void do_psetpickmode()
  556. {
  557.   Pint wsid, dev;
  558.   Pop_mode mode;
  559.   Pecho_switch echo;
  560.  
  561.   wsid = readinteger("workstation identifier ? ");
  562.   dev = readinteger("pick device number ? ");
  563.   mode = readphigsenum(PTKEIMODE, "operating mode ? ");
  564.   echo = readphigsenum(PTKEESW, "echo switch ? ");
  565.   pset_pick_mode(wsid, dev, mode, echo);
  566. }  /* do_psetpickmode */
  567.  
  568. /*--------------------------------------------------------------------------*/
  569.  
  570. static void do_psetlineind()
  571. {
  572.   pset_line_ind(readposinteger("polyline index ? "));
  573. }  /* do_psetlineind */
  574.  
  575. /*--------------------------------------------------------------------------*/
  576.  
  577. static void do_psetlinerep()
  578. {
  579.   Pint wsid, index;
  580.   Pline_bundle rep;
  581.  
  582.   wsid = readinteger("workstation identifier ? ");
  583.   index = readposinteger("line bundle index ? ");
  584.   readlnbundl(&rep);
  585.   pset_line_rep(wsid, index, &rep);
  586. }  /* do_psetlinerep */
  587.  
  588. /*--------------------------------------------------------------------------*/
  589.  
  590. static void do_psetmarkerind()
  591. {
  592.   pset_marker_ind(readposinteger("polymarker index ? "));
  593. }  /* do_psetmarkerind */
  594.  
  595. /*--------------------------------------------------------------------------*/
  596.  
  597. static void do_psetmarkerrep()
  598. {
  599.   Pint wsid, index;
  600.   Pmarker_bundle rep;
  601.  
  602.   wsid = readinteger("workstation identifier ? ");
  603.   index = readposinteger("marker bundle index ? ");
  604.   readmkbundl(&rep);
  605.   pset_marker_rep(wsid, index, &rep);
  606. }  /* do_psetmarkerrep */
  607.  
  608. /*--------------------------------------------------------------------------*/
  609.  
  610. static void do_psetstringmode()
  611. {
  612.   Pint wsid, dev;
  613.   Pop_mode mode;
  614.   Pecho_switch echo;
  615.  
  616.   wsid = readinteger("workstation identifier ? ");
  617.   dev = readinteger("string device number ? ");
  618.   mode = readphigsenum(PTKEIMODE, "operating mode ? ");
  619.   echo = readphigsenum(PTKEESW, "echo switch ? ");
  620.   pset_string_mode(wsid, dev, mode, echo);
  621. }  /* do_psetstringmode */
  622.  
  623. /*--------------------------------------------------------------------------*/
  624.  
  625. static void do_psetstrokemode()
  626. {
  627.   Pint wsid, dev;
  628.   Pop_mode mode;
  629.   Pecho_switch echo;
  630.  
  631.   wsid = readinteger("workstation identifier ? ");
  632.   dev = readinteger("stroke device number ? ");
  633.   mode = readphigsenum(PTKEIMODE, "operating mode ? ");
  634.   echo = readphigsenum(PTKEESW, "echo switch ? ");
  635.   pset_stroke_mode(wsid, dev, mode, echo);
  636. }  /* do_psetstrokemode */
  637.  
  638. /*--------------------------------------------------------------------------*/
  639.  
  640. static void do_psettextalign()
  641. {
  642.   Ptext_align a;
  643.  
  644.   a.hor = readphigsenum(PTKETXHOR, "horizontal alignment ? ");
  645.   a.vert = readphigsenum(PTKETXVER, "vertical alignment ? ");
  646.   pset_text_align(&a);
  647. }  /* do_psetextalign */
  648.  
  649. /*--------------------------------------------------------------------------*/
  650.  
  651. static void do_psettextcolourind()
  652. {
  653.   pset_text_colr_ind(readposintvalue("text colour index ? ", PTKECOLOURIND));
  654. }  /* do_psettextcolourind */
  655.  
  656. /*--------------------------------------------------------------------------*/
  657.  
  658. static void do_psettextfont()
  659. {
  660.   pset_text_font(readinteger("text font ? "));
  661. }  /* do_psettextfont */
  662.  
  663. /*--------------------------------------------------------------------------*/
  664.  
  665. static void do_psettextind()
  666. {
  667.   pset_text_ind(readposinteger("text index ? "));
  668. }  /* do_psettextind */
  669.  
  670. /*--------------------------------------------------------------------------*/
  671.  
  672. static void do_psettextpath()
  673. {
  674.   Ptext_path p;
  675.  
  676.   p = readphigsenum(PTKETXPATH, "text path ? ");
  677.   pset_text_path(p);
  678. }  /* do_psettextpath */
  679.  
  680. /*--------------------------------------------------------------------------*/
  681.  
  682. static void do_psettextprec()
  683. {
  684.   Ptext_prec txprec;
  685.  
  686.   txprec = readphigsenum(PTKETXPREC, "text precision ? ");
  687.   pset_text_prec(txprec);
  688. }  /* do_psettextprec */
  689.  
  690. /*--------------------------------------------------------------------------*/
  691.  
  692. static void do_psettextrep()
  693. {
  694.   Pint wsid, index;
  695.   Ptext_bundle rep;
  696.  
  697.   wsid = readinteger("workstation identifier ? ");
  698.   index = readposinteger("text bundle index ? ");
  699.   readtxbundl(&rep);
  700.   pset_text_rep(wsid, index, &rep);
  701. }  /* do_psettextrep */
  702.  
  703. /*--------------------------------------------------------------------------*/
  704.  
  705. static void do_psetvalmode()
  706. {
  707.   Pint wsid, dev;
  708.   Pop_mode mode;
  709.   Pecho_switch echo;
  710.  
  711.   wsid = readinteger("workstation identifier ? ");
  712.   dev = readinteger("valuator device number ? ");
  713.   mode = readphigsenum(PTKEIMODE, "operating mode ? ");
  714.   echo = readphigsenum(PTKEESW, "echo switch ? ");
  715.   pset_val_mode(wsid, dev, mode, echo);
  716. }  /* do_psetvalmode */
  717.  
  718. /*--------------------------------------------------------------------------*/
  719.  
  720. static void do_psetviewind()
  721. {
  722.   Pint i;
  723.  
  724.   i = readposintvalue("view index? ", PTKEVIEWIND);
  725.   pset_view_ind(i);
  726. }  /* do_psetviewind */
  727.  
  728. /*--------------------------------------------------------------------------*/
  729.  
  730. static void do_psetviewrep()
  731. {
  732.   Pint wsid, index;
  733.   Pview_rep rep;
  734.  
  735.   wsid = readinteger("workstation identifier ? ");
  736.   index = readposintvalue("view index ? ", PTKEVIEWIND);
  737.   readmatrix(rep.ori_matrix, "orientation matrix");
  738.   readmatrix(rep.map_matrix, "mapping matrix");
  739.   rep.clip_limit = readlimit("clipping limits");
  740.   rep.xy_clip = readphigsenum(PTKECLIP, "x-y clipping indicator ? ");
  741.   pset_view_rep(wsid, index, &rep);
  742. }  /* do_psetviewrep */
  743.  
  744. /*--------------------------------------------------------------------------*/
  745.  
  746. static void do_psetviewrep3()
  747. {
  748.   Pint wsid, index;
  749.   Pview_rep3 rep;
  750.  
  751.   wsid = readinteger("workstation identifier ? ");
  752.   index = readposinteger("view index ? ");
  753.   readmatrix3(rep.ori_matrix, "orientation matrix");
  754.   readmatrix3(rep.map_matrix, "mapping matrix");
  755.   rep.clip_limit = readlimit3("clipping limits");
  756.   rep.xy_clip = readphigsenum(PTKECLIP, "x-y clipping indicator ? ");
  757.   rep.back_clip = readphigsenum(PTKECLIP, "back clipping indicator ? ");
  758.   rep.front_clip = readphigsenum(PTKECLIP, "front clipping indicator ? ");
  759.   pset_view_rep3(wsid, index, &rep);
  760. }  /* do_psetviewrep3 */
  761.  
  762. /*--------------------------------------------------------------------------*/
  763.  
  764. static void do_psetviewtraninputpri()
  765. {
  766.   Pint wsid, index, refindex;
  767.   Prel_pri priority;
  768.  
  769.   wsid = readinteger("workstation identifier ? ");
  770.   index = readposinteger("view index ? ");
  771.   refindex = readposinteger("reference view index ? ");
  772.   priority = readphigsenum(PTKEVPRI, "relative priority ? ");
  773.   pset_view_tran_in_pri(wsid, index, refindex, priority);
  774. }  /* do_psetviewtraninputpri */
  775.  
  776. /*--------------------------------------------------------------------------*/
  777.  
  778. static void do_psetwsviewport()
  779. {
  780.   Pint wsid;
  781.   Plimit viewport;
  782.  
  783.   wsid = readinteger("workstation identifier ? ");
  784.   viewport = readlimit("viewport limits");
  785.   pset_ws_vp(wsid, &viewport);
  786. }  /* do_psetwsviewport */
  787.  
  788. /*--------------------------------------------------------------------------*/
  789.  
  790. static void do_psetwsviewport3()
  791. {
  792.   Pint wsid;
  793.   Plimit3 viewport;
  794.  
  795.   wsid = readinteger("workstation identifier ? ");
  796.   viewport = readlimit3("viewport limits");
  797.   pset_ws_vp3(wsid, &viewport);
  798. }  /* do_psetwsviewport3 */
  799.  
  800. /*--------------------------------------------------------------------------*/
  801.  
  802. static void do_psetwswindow()
  803. {
  804.   Pint wsid;
  805.   Plimit window;
  806.  
  807.   wsid = readinteger("workstation identifier ? ");
  808.   window = readlimit("window limits");
  809.   pset_ws_win(wsid, &window);
  810. }  /* do_psetwswindow */
  811.  
  812. /*--------------------------------------------------------------------------*/
  813.  
  814. static void do_psetwswindow3()
  815. {
  816.   Pint wsid;
  817.   Plimit3 window;
  818.  
  819.   wsid = readinteger("workstation identifier ? ");
  820.   window = readlimit3("window limits");
  821.   pset_ws_win3(wsid, &window);
  822. }  /* do_psetwswindow3 */
  823.  
  824. /*--------------------------------------------------------------------------*/
  825.  
  826. /* end of psetfns.c */
  827.